<?php

namespace App\Http\Requests\Wechat\User;

use App\Http\Requests\ApiRequest;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

/**
 * @property string|null scan_event_id
 * @property string latitude
 * @property string longitude
 */
class PatchLocationRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'openid'        => 'required|string',
            'latitude'      => 'required',
            'longitude'     => 'required',
        ];
    }

    /**
     * @return array
     */
//    public function messages()
//    {
//        return [
//            'openid.*'        => '微信用户的openid必须是字符串',
//            'appid.*'         => '公众号的appid必须是字符串',
//            'latitude.*'      => '纬度值必须填写',
//            'longitude.*'     => '经度值必须填写'
//        ];
//    }
}
